Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Restrict which repos get dispatch-ci #40

Merged

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Feb 15, 2024

Issue #37

Note I ended up putting in some checking for is_meta_repo() aka .github repo which recently was added, this is required otherwise you cannot do a full dry-run

We want still want dispatch-ci on composer-plugins() specifically for vendor-plugin() which integrates with other things - https://github.com/silverstripe/vendor-plugin/actions/runs/7871071271

recipe-plugin() only does linting, so it's a bit pointless being on a cron like this though it's cleaner to just keep it on dispatch-ci - https://github.com/silverstripe/recipe-plugin/actions/runs/7854707347

should_use_dispatch_ci() will return as follows for the repos:

[0] => yes: silverstripe-maintenance
[1] => yes: silverstripe-composer-update-checker
[2] => yes: GridFieldBulkEditingTools
[3] => yes: cwp-agencyextensions
[4] => yes: cwp-starter-theme
[5] => no : developer-docs
[6] => yes: cwp-watea-theme
[7] => yes: silverstripe-elemental
[8] => yes: silverstripe-elemental-userforms
[9] => yes: silverstripe-admin
[10] => yes: silverstripe-asset-admin
[11] => yes: silverstripe-assets
[12] => yes: silverstripe-auditor
[13] => yes: silverstripe-blog
[14] => yes: silverstripe-campaign-admin
[15] => yes: silverstripe-cms
[16] => yes: silverstripe-config
[17] => yes: silverstripe-contentreview
[18] => yes: silverstripe-crontask
[19] => yes: silverstripe-documentconverter
[20] => yes: silverstripe-elemental-bannerblock
[21] => yes: silverstripe-elemental-fileblock
[22] => yes: silverstripe-environmentcheck
[23] => yes: silverstripe-errorpage
[24] => no : eslint-config
[25] => yes: silverstripe-externallinks
[26] => yes: silverstripe-framework
[27] => yes: silverstripe-graphql
[28] => yes: silverstripe-gridfieldqueuedexport
[29] => yes: silverstripe-hybridsessions
[30] => yes: silverstripe-iframe
[31] => yes: silverstripe-installer
[32] => yes: silverstripe-ldap
[33] => yes: silverstripe-linkfield
[34] => yes: silverstripe-lumberjack
[35] => yes: silverstripe-mimevalidator
[36] => yes: silverstripe-realme
[37] => yes: silverstripe-session-manager
[38] => yes: recipe-authoring-tools
[39] => yes: recipe-blog
[40] => yes: recipe-cms
[41] => yes: recipe-collaboration
[42] => yes: recipe-content-blocks
[43] => yes: recipe-core
[44] => yes: recipe-form-building
[45] => yes: recipe-plugin
[46] => yes: recipe-reporting-tools
[47] => yes: recipe-services
[48] => yes: silverstripe-registry
[49] => yes: silverstripe-reports
[50] => yes: silverstripe-restfulserver
[51] => yes: silverstripe-securityreport
[52] => yes: silverstripe-segment-field
[53] => yes: silverstripe-sharedraftcontent
[54] => yes: silverstripe-siteconfig
[55] => yes: silverstripe-sitewidecontent-report
[56] => yes: silverstripe-spamprotection
[57] => yes: silverstripe-staticpublishqueue
[58] => yes: silverstripe-subsites
[59] => yes: silverstripe-tagfield
[60] => yes: silverstripe-taxonomy
[61] => yes: silverstripe-textextraction
[62] => yes: silverstripe-userforms
[63] => yes: vendor-plugin
[64] => yes: silverstripe-versioned
[65] => yes: silverstripe-versioned-admin
[66] => yes: silverstripe-versionfeed
[67] => no : webpack-config
[68] => yes: silverstripe-simple
[69] => yes: silverstripe-advancedworkflow
[70] => yes: silverstripe-gridfieldextensions
[71] => yes: silverstripe-multivaluefield
[72] => yes: silverstripe-queuedjobs
[73] => yes: silverstripe-fluent
[74] => yes: silverstripe-mfa
[75] => yes: silverstripe-totp-authenticator
[76] => yes: silverstripe-webauthn-authenticator
[77] => yes: silverstripe-login-forms
[78] => yes: silverstripe-dynamodb
[79] => no : gha-ci
[80] => no : gha-run-tests
[81] => no : gha-generate-matrix
[82] => no : gha-auto-tag
[83] => no : gha-pull-request
[84] => no : gha-tag-release
[85] => no : gha-update-js
[86] => no : gha-keepalive
[87] => no : .github
[88] => no : gha-dispatch-ci
[89] => no : gha-issue
[90] => no : gha-merge-up
[91] => no : gha-action-ci
[92] => no : gha-gauge-release
[93] => no : gha-trigger-ci
[94] => no : markdown-php-codesniffer
[95] => no : silverstripe-standards

@emteknetnz emteknetnz force-pushed the pulls/main/dispatch-ci branch 2 times, most recently from 772c190 to 5fe7e57 Compare February 15, 2024 04:06
funcs_scripts.php Outdated Show resolved Hide resolved
update_command.php Outdated Show resolved Hide resolved
@emteknetnz emteknetnz force-pushed the pulls/main/dispatch-ci branch from 5fe7e57 to 905f5fb Compare February 15, 2024 20:53
write_file_even_if_exists('.github/workflows/dispatch-ci.yml', $content);
$dispatchCiPath = '.github/workflows/dispatch-ci.yml';
$ciPath = '.github/workflows/ci.yml';
$shouldHaveDispatchCi = (is_module() || is_composer_plugin()) && !is_docs() && !is_gha_repository();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realistically I think is_module() || is_composer_plugin() is all that's needed here, but doesn't hurt to be explicit so it can stay as is.

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I assume you've tested it.

@GuySartorelli GuySartorelli merged commit 29b904d into silverstripe:main Feb 15, 2024
1 check passed
@GuySartorelli GuySartorelli deleted the pulls/main/dispatch-ci branch February 15, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants